Imports Microsoft.VisualBasic
Imports System
Imports System.Runtime.InteropServices
Imports System.Drawing


Namespace Phoenix.Tools.Win32
    ''' <summary>
    ''' Window API enumerations
    ''' </summary>

#Region "Peek Message Flags"
    Public Enum PeekMessageFlags
        PM_NOREMOVE = 0
        PM_REMOVE = 1
        PM_NOYIELD = 2
    End Enum
#End Region

#Region "Windows Messages"
    Public Enum MsgEnum
        WM_NULL = &H0
        WM_CREATE = &H1
        WM_DESTROY = &H2
        WM_MOVE = &H3
        WM_SIZE = &H5
        WM_ACTIVATE = &H6
        WM_SETFOCUS = &H7
        WM_KILLFOCUS = &H8
        WM_ENABLE = &HA
        WM_SETREDRAW = &HB
        WM_SETTEXT = &HC
        WM_GETTEXT = &HD
        WM_GETTEXTLENGTH = &HE
        WM_PAINT = &HF
        WM_CLOSE = &H10
        WM_QUERYENDSESSION = &H11
        WM_QUIT = &H12
        WM_QUERYOPEN = &H13
        WM_ERASEBKGND = &H14
        WM_SYSCOLORCHANGE = &H15
        WM_ENDSESSION = &H16
        WM_SHOWWINDOW = &H18
        WM_CTLCOLOR = &H19
        WM_WININICHANGE = &H1A
        WM_SETTINGCHANGE = &H1A
        WM_DEVMODECHANGE = &H1B
        WM_ACTIVATEAPP = &H1C
        WM_FONTCHANGE = &H1D
        WM_TIMECHANGE = &H1E
        WM_CANCELMODE = &H1F
        WM_SETCURSOR = &H20
        WM_MOUSEACTIVATE = &H21
        WM_CHILDACTIVATE = &H22
        WM_QUEUESYNC = &H23
        WM_GETMINMAXINFO = &H24
        WM_PAINTICON = &H26
        WM_ICONERASEBKGND = &H27
        WM_NEXTDLGCTL = &H28
        WM_SPOOLERSTATUS = &H2A
        WM_DRAWITEM = &H2B
        WM_MEASUREITEM = &H2C
        WM_DELETEITEM = &H2D
        WM_VKEYTOITEM = &H2E
        WM_CHARTOITEM = &H2F
        WM_SETFONT = &H30
        WM_GETFONT = &H31
        WM_SETHOTKEY = &H32
        WM_GETHOTKEY = &H33
        WM_QUERYDRAGICON = &H37
        WM_COMPAREITEM = &H39
        WM_GETOBJECT = &H3D
        WM_COMPACTING = &H41
        WM_COMMNOTIFY = &H44
        WM_WINDOWPOSCHANGING = &H46
        WM_WINDOWPOSCHANGED = &H47
        WM_POWER = &H48
        WM_COPYDATA = &H4A
        WM_CANCELJOURNAL = &H4B
        WM_NOTIFY = &H4E
        WM_INPUTLANGCHANGEREQUEST = &H50
        WM_INPUTLANGCHANGE = &H51
        WM_TCARD = &H52
        WM_HELP = &H53
        WM_USERCHANGED = &H54
        WM_NOTIFYFORMAT = &H55
        WM_CONTEXTMENU = &H7B
        WM_STYLECHANGING = &H7C
        WM_STYLECHANGED = &H7D
        WM_DISPLAYCHANGE = &H7E
        WM_GETICON = &H7F
        WM_SETICON = &H80
        WM_NCCREATE = &H81
        WM_NCDESTROY = &H82
        WM_NCCALCSIZE = &H83
        WM_NCHITTEST = &H84
        WM_NCPAINT = &H85
        WM_NCACTIVATE = &H86
        WM_GETDLGCODE = &H87
        WM_SYNCPAINT = &H88
        WM_NCMOUSEMOVE = &HA0
        WM_NCLBUTTONDOWN = &HA1
        WM_NCLBUTTONUP = &HA2
        WM_NCLBUTTONDBLCLK = &HA3
        WM_NCRBUTTONDOWN = &HA4
        WM_NCRBUTTONUP = &HA5
        WM_NCRBUTTONDBLCLK = &HA6
        WM_NCMBUTTONDOWN = &HA7
        WM_NCMBUTTONUP = &HA8
        WM_NCMBUTTONDBLCLK = &HA9
        WM_KEYDOWN = &H100
        WM_KEYUP = &H101
        WM_CHAR = &H102
        WM_DEADCHAR = &H103
        WM_SYSKEYDOWN = &H104
        WM_SYSKEYUP = &H105
        WM_SYSCHAR = &H106
        WM_SYSDEADCHAR = &H107
        WM_KEYLAST = &H108
        WM_IME_STARTCOMPOSITION = &H10D
        WM_IME_ENDCOMPOSITION = &H10E
        WM_IME_COMPOSITION = &H10F
        WM_IME_KEYLAST = &H10F
        WM_INITDIALOG = &H110
        WM_COMMAND = &H111
        WM_SYSCOMMAND = &H112
        WM_TIMER = &H113
        WM_HSCROLL = &H114
        WM_VSCROLL = &H115
        WM_INITMENU = &H116
        WM_INITMENUPOPUP = &H117
        WM_MENUSELECT = &H11F
        WM_MENUCHAR = &H120
        WM_ENTERIDLE = &H121
        WM_MENURBUTTONUP = &H122
        WM_MENUDRAG = &H123
        WM_MENUGETOBJECT = &H124
        WM_UNINITMENUPOPUP = &H125
        WM_MENUCOMMAND = &H126
        WM_CTLCOLORMSGBOX = &H132
        WM_CTLCOLOREDIT = &H133
        WM_CTLCOLORLISTBOX = &H134
        WM_CTLCOLORBTN = &H135
        WM_CTLCOLORDLG = &H136
        WM_CTLCOLORSCROLLBAR = &H137
        WM_CTLCOLORSTATIC = &H138
        WM_MOUSEMOVE = &H200
        WM_LBUTTONDOWN = &H201
        WM_LBUTTONUP = &H202
        WM_LBUTTONDBLCLK = &H203
        WM_RBUTTONDOWN = &H204
        WM_RBUTTONUP = &H205
        WM_RBUTTONDBLCLK = &H206
        WM_MBUTTONDOWN = &H207
        WM_MBUTTONUP = &H208
        WM_MBUTTONDBLCLK = &H209
        WM_MOUSEWHEEL = &H20A
        WM_PARENTNOTIFY = &H210
        WM_ENTERMENULOOP = &H211
        WM_EXITMENULOOP = &H212
        WM_NEXTMENU = &H213
        WM_SIZING = &H214
        WM_CAPTURECHANGED = &H215
        WM_MOVING = &H216
        WM_DEVICECHANGE = &H219
        WM_MDICREATE = &H220
        WM_MDIDESTROY = &H221
        WM_MDIACTIVATE = &H222
        WM_MDIRESTORE = &H223
        WM_MDINEXT = &H224
        WM_MDIMAXIMIZE = &H225
        WM_MDITILE = &H226
        WM_MDICASCADE = &H227
        WM_MDIICONARRANGE = &H228
        WM_MDIGETACTIVE = &H229
        WM_MDISETMENU = &H230
        WM_ENTERSIZEMOVE = &H231
        WM_EXITSIZEMOVE = &H232
        WM_DROPFILES = &H233
        WM_MDIREFRESHMENU = &H234
        WM_IME_SETCONTEXT = &H281
        WM_IME_NOTIFY = &H282
        WM_IME_CONTROL = &H283
        WM_IME_COMPOSITIONFULL = &H284
        WM_IME_SELECT = &H285
        WM_IME_CHAR = &H286
        WM_IME_REQUEST = &H288
        WM_IME_KEYDOWN = &H290
        WM_IME_KEYUP = &H291
        WM_MOUSEHOVER = &H2A1
        WM_MOUSELEAVE = &H2A3
        WM_CUT = &H300
        WM_COPY = &H301
        WM_PASTE = &H302
        WM_CLEAR = &H303
        WM_UNDO = &H304
        WM_RENDERFORMAT = &H305
        WM_RENDERALLFORMATS = &H306
        WM_DESTROYCLIPBOARD = &H307
        WM_DRAWCLIPBOARD = &H308
        WM_PAINTCLIPBOARD = &H309
        WM_VSCROLLCLIPBOARD = &H30A
        WM_SIZECLIPBOARD = &H30B
        WM_ASKCBFORMATNAME = &H30C
        WM_CHANGECBCHAIN = &H30D
        WM_HSCROLLCLIPBOARD = &H30E
        WM_QUERYNEWPALETTE = &H30F
        WM_PALETTEISCHANGING = &H310
        WM_PALETTECHANGED = &H311
        WM_HOTKEY = &H312
        WM_PRINT = &H317
        WM_PRINTCLIENT = &H318
        WM_HANDHELDFIRST = &H358
        WM_HANDHELDLAST = &H35F
        WM_AFXFIRST = &H360
        WM_AFXLAST = &H37F
        WM_PENWINFIRST = &H380
        WM_PENWINLAST = &H38F
        WM_APP = &H8000
        WM_USER = &H400
        WM_REFLECT = WM_USER + &H1C00
        WM_TASKBAR_CREATED = &HC086
        NIN_BALLOONSHOW = &H402
        NIN_BALLOONHIDE = &H403
        NIN_BALLOONTIMEOUT = &H404
        NIN_BALLOONUSERCLICK = &H405
    End Enum
#End Region

#Region "Window Styles"
    Public Enum WindowStyles As Integer
        WS_OVERLAPPED = &H0
        WS_POPUP = &H80000000
        WS_CHILD = &H40000000
        WS_MINIMIZE = &H20000000
        WS_VISIBLE = &H10000000
        WS_DISABLED = &H8000000
        WS_CLIPSIBLINGS = &H4000000
        WS_CLIPCHILDREN = &H2000000
        WS_MAXIMIZE = &H1000000
        WS_CAPTION = &HC00000
        WS_BORDER = &H800000
        WS_DLGFRAME = &H400000
        WS_VSCROLL = &H200000
        WS_HSCROLL = &H100000
        WS_SYSMENU = &H80000
        WS_THICKFRAME = &H40000
        WS_GROUP = &H20000
        WS_TABSTOP = &H10000
        WS_MINIMIZEBOX = &H20000
        WS_MAXIMIZEBOX = &H10000
        WS_TILED = &H0
        WS_ICONIC = &H20000000
        WS_SIZEBOX = &H40000
        WS_POPUPWINDOW = &H80880000
        WS_OVERLAPPEDWINDOW = &HCF0000
        WS_TILEDWINDOW = &HCF0000
        WS_CHILDWINDOW = &H40000000
    End Enum
#End Region

#Region "Window Extended Styles"
    Public Enum WindowExStyles
        WS_EX_DLGMODALFRAME = &H1
        WS_EX_NOPARENTNOTIFY = &H4
        WS_EX_TOPMOST = &H8
        WS_EX_ACCEPTFILES = &H10
        WS_EX_TRANSPARENT = &H20
        WS_EX_MDICHILD = &H40
        WS_EX_TOOLWINDOW = &H80
        WS_EX_WINDOWEDGE = &H100
        WS_EX_CLIENTEDGE = &H200
        WS_EX_CONTEXTHELP = &H400
        WS_EX_RIGHT = &H1000
        WS_EX_LEFT = &H0
        WS_EX_RTLREADING = &H2000
        WS_EX_LTRREADING = &H0
        WS_EX_LEFTSCROLLBAR = &H4000
        WS_EX_RIGHTSCROLLBAR = &H0
        WS_EX_CONTROLPARENT = &H10000
        WS_EX_STATICEDGE = &H20000
        WS_EX_APPWINDOW = &H40000
        WS_EX_OVERLAPPEDWINDOW = &H300
        WS_EX_PALETTEWINDOW = &H188
        WS_EX_LAYERED = &H80000
    End Enum
#End Region

#Region "Edit control Styles"
    Public Enum EditControlStyles
        ES_LEFT = &H0
        ES_CENTER = &H1
        ES_RIGHT = &H2
        ES_MULTILINE = &H4
        ES_UPPERCASE = &H8
        ES_LOWERCASE = &H10
        ES_PASSWORD = &H20
        ES_AUTOVSCROLL = &H40
        ES_AUTOHSCROLL = &H80
        ES_NOHIDESEL = &H100
        ES_OEMCONVERT = &H400
        ES_READONLY = &H800
        ES_WANTRETURN = &H1000
        ES_NUMBER = &H2000
    End Enum
#End Region

#Region "Spin Control styles"
    Public Enum SpinControlStyles
        UDS_WRAP = &H1
        UDS_SETBUDDYINT = &H2
        UDS_ALIGNRIGHT = &H4
        UDS_ALIGNLEFT = &H8
        UDS_AUTOBUDDY = &H10
        UDS_ARROWKEYS = &H20
        UDS_HORZ = &H40
        UDS_NOTHOUSANDS = &H80
        UDS_HOTTRACK = &H100
    End Enum
#End Region

#Region "Edit Control Messages"
    Public Enum EditConrolNotifyMsg
        EN_SETFOCUS = &H100
        EN_KILLFOCUS = &H200
        EN_CHANGE = &H300
        EN_UPDATE = &H400
        EN_ERRSPACE = &H500
        EN_MAXTEXT = &H501
        EN_HSCROLL = &H601
        EN_VSCROLL = &H602
    End Enum

    Public Enum EditControlSetMargin
        EC_LEFTMARGIN = &H1
        EC_RIGHTMARGIN = &H2
        EC_USEFONTINFO = &HFFFF
    End Enum

    Public Enum EditControlMsg
        EM_GETSEL = &HB0
        EM_SETSEL = &HB1
        EM_GETRECT = &HB2
        EM_SETRECT = &HB3
        EM_SETRECTNP = &HB4
        EM_SCROLL = &HB5
        EM_LINESCROLL = &HB6
        EM_SCROLLCARET = &HB7
        EM_GETMODIFY = &HB8
        EM_SETMODIFY = &HB9
        EM_GETLINECOUNT = &HBA
        EM_LINEINDEX = &HBB
        EM_SETHANDLE = &HBC
        EM_GETHANDLE = &HBD
        EM_GETTHUMB = &HBE
        EM_LINELENGTH = &HC1
        EM_REPLACESEL = &HC2
        EM_GETLINE = &HC4
        EM_LIMITTEXT = &HC5
        EM_CANUNDO = &HC6
        EM_UNDO = &HC7
        EM_FMTLINES = &HC8
        EM_LINEFROMCHAR = &HC9
        EM_SETTABSTOPS = &HCB
        EM_SETPASSWORDCHAR = &HCC
        EM_EMPTYUNDOBUFFER = &HCD
        EM_GETFIRSTVISIBLELINE = &HCE
        EM_SETREADONLY = &HCF
        EM_SETWORDBREAKPROC = &HD0
        EM_GETWORDBREAKPROC = &HD1
        EM_GETPASSWORDCHAR = &HD2
        EM_SETMARGINS = &HD3
        EM_GETMARGINS = &HD4
        EM_SETLIMITTEXT = EM_LIMITTEXT
        EM_GETLIMITTEXT = &HD5
        EM_POSFROMCHAR = &HD6
        EM_CHARFROMPOS = &HD7
        EM_SETIMESTATUS = &HD8
        EM_GETIMESTATUS = &HD9
    End Enum
#End Region

#Region "Spin Control Messages"
    Public Enum SpinControlMsg As Integer
        WM_USER = &H400
        CCM_FIRST = &H2000
        CCM_SETUNICODEFORMAT = (CCM_FIRST + 5)
        CCM_GETUNICODEFORMAT = (CCM_FIRST + 6)
        UDM_SETRANGE = (WM_USER + 101)
        UDM_GETRANGE = (WM_USER + 102)
        UDM_SETPOS = (WM_USER + 103)
        UDM_GETPOS = (WM_USER + 104)
        UDM_SETBUDDY = (WM_USER + 105)
        UDM_GETBUDDY = (WM_USER + 106)
        UDM_SETACCEL = (WM_USER + 107)
        UDM_GETACCEL = (WM_USER + 108)
        UDM_SETBASE = (WM_USER + 109)
        UDM_GETBASE = (WM_USER + 110)
        UDM_SETRANGE32 = (WM_USER + 111)
        UDM_GETRANGE32 = (WM_USER + 112)
        UDM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT
        UDM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT
        UDM_SETPOS32 = (WM_USER + 113)
        UDM_GETPOS32 = (WM_USER + 114)

    End Enum
#End Region

#Region "ShowWindow Styles"
    Public Enum ShowWindowStyles As Short
        SW_HIDE = 0
        SW_SHOWNORMAL = 1
        SW_NORMAL = 1
        SW_SHOWMINIMIZED = 2
        SW_SHOWMAXIMIZED = 3
        SW_MAXIMIZE = 3
        SW_SHOWNOACTIVATE = 4
        SW_SHOW = 5
        SW_MINIMIZE = 6
        SW_SHOWMINNOACTIVE = 7
        SW_SHOWNA = 8
        SW_RESTORE = 9
        SW_SHOWDEFAULT = 10
        SW_FORCEMINIMIZE = 11
        SW_MAX = 11
    End Enum

#End Region

#Region "SetWindowPos Z Order"
    Public Enum SetWindowPosZOrder
        HWND_TOP = 0
        HWND_BOTTOM = 1
        HWND_TOPMOST = -1
        HWND_NOTOPMOST = -2
    End Enum
#End Region

#Region "SetWindowPosFlags"
    Public Enum SetWindowPosFlags As Integer
        SWP_NOSIZE = &H1
        SWP_NOMOVE = &H2
        SWP_NOZORDER = &H4
        SWP_NOREDRAW = &H8
        SWP_NOACTIVATE = &H10
        SWP_FRAMECHANGED = &H20
        SWP_SHOWWINDOW = &H40
        SWP_HIDEWINDOW = &H80
        SWP_NOCOPYBITS = &H100
        SWP_NOOWNERZORDER = &H200
        SWP_NOSENDCHANGING = &H400
        SWP_DRAWFRAME = &H20
        SWP_NOREPOSITION = &H200
        SWP_DEFERERASE = &H2000
        SWP_ASYNCWINDOWPOS = &H4000
    End Enum
#End Region

#Region "Virtual Keys"
    Public Enum VirtualKeys
        VK_LBUTTON = &H1
        VK_CANCEL = &H3
        VK_BACK = &H8
        VK_TAB = &H9
        VK_CLEAR = &HC
        VK_RETURN = &HD
        VK_SHIFT = &H10
        VK_CONTROL = &H11
        VK_MENU = &H12
        VK_CAPITAL = &H14
        VK_ESCAPE = &H1B
        VK_SPACE = &H20
        VK_PRIOR = &H21
        VK_NEXT = &H22
        VK_END = &H23
        VK_HOME = &H24
        VK_LEFT = &H25
        VK_UP = &H26
        VK_RIGHT = &H27
        VK_DOWN = &H28
        VK_SELECT = &H29
        VK_EXECUTE = &H2B
        VK_SNAPSHOT = &H2C
        VK_HELP = &H2F
        VK_0 = &H30
        VK_1 = &H31
        VK_2 = &H32
        VK_3 = &H33
        VK_4 = &H34
        VK_5 = &H35
        VK_6 = &H36
        VK_7 = &H37
        VK_8 = &H38
        VK_9 = &H39
        VK_A = &H41
        VK_B = &H42
        VK_C = &H43
        VK_D = &H44
        VK_E = &H45
        VK_F = &H46
        VK_G = &H47
        VK_H = &H48
        VK_I = &H49
        VK_J = &H4A
        VK_K = &H4B
        VK_L = &H4C
        VK_M = &H4D
        VK_N = &H4E
        VK_O = &H4F
        VK_P = &H50
        VK_Q = &H51
        VK_R = &H52
        VK_S = &H53
        VK_T = &H54
        VK_U = &H55
        VK_V = &H56
        VK_W = &H57
        VK_X = &H58
        VK_Y = &H59
        VK_Z = &H5A
        VK_NUMPAD0 = &H60
        VK_NUMPAD1 = &H61
        VK_NUMPAD2 = &H62
        VK_NUMPAD3 = &H63
        VK_NUMPAD4 = &H64
        VK_NUMPAD5 = &H65
        VK_NUMPAD6 = &H66
        VK_NUMPAD7 = &H67
        VK_NUMPAD8 = &H68
        VK_NUMPAD9 = &H69
        VK_MULTIPLY = &H6A
        VK_ADD = &H6B
        VK_SEPARATOR = &H6C
        VK_SUBTRACT = &H6D
        VK_DECIMAL = &H6E
        VK_DIVIDE = &H6F
        VK_ATTN = &HF6
        VK_CRSEL = &HF7
        VK_EXSEL = &HF8
        VK_EREOF = &HF9
        VK_PLAY = &HFA
        VK_ZOOM = &HFB
        VK_NONAME = &HFC
        VK_PA1 = &HFD
        VK_OEM_CLEAR = &HFE
        VK_LWIN = &H5B
        VK_RWIN = &H5C
        VK_APPS = &H5D
        VK_LSHIFT = &HA0
        VK_RSHIFT = &HA1
        VK_LCONTROL = &HA2
        VK_RCONTROL = &HA3
        VK_LMENU = &HA4
        VK_RMENU = &HA5
    End Enum
#End Region

#Region "PatBlt Types"
    Public Enum PatBltTypes
        SRCCOPY = &HCC0020
        SRCPAINT = &HEE0086
        SRCAND = &H8800C6
        SRCINVERT = &H660046
        SRCERASE = &H440328
        NOTSRCCOPY = &H330008
        NOTSRCERASE = &H1100A6
        MERGECOPY = &HC000CA
        MERGEPAINT = &HBB0226
        PATCOPY = &HF00021
        PATPAINT = &HFB0A09
        PATINVERT = &H5A0049
        DSTINVERT = &H550009
        BLACKNESS = &H42
        WHITENESS = &HFF0062
    End Enum
#End Region

#Region "Clipboard Formats"
    Public Enum ClipboardFormats As Integer
        CF_TEXT = 1
        CF_BITMAP = 2
        CF_METAFILEPICT = 3
        CF_SYLK = 4
        CF_DIF = 5
        CF_TIFF = 6
        CF_OEMTEXT = 7
        CF_DIB = 8
        CF_PALETTE = 9
        CF_PENDATA = 10
        CF_RIFF = 11
        CF_WAVE = 12
        CF_UNICODETEXT = 13
        CF_ENHMETAFILE = 14
        CF_HDROP = 15
        CF_LOCALE = 16
        CF_MAX = 17
        CF_OWNERDISPLAY = &H80
        CF_DSPTEXT = &H81
        CF_DSPBITMAP = &H82
        CF_DSPMETAFILEPICT = &H83
        CF_DSPENHMETAFILE = &H8E
        CF_PRIVATEFIRST = &H200
        CF_PRIVATELAST = &H2FF
        CF_GDIOBJFIRST = &H300
        CF_GDIOBJLAST = &H3FF
    End Enum
#End Region

#Region "Common Controls Initialization flags"
    Public Enum CommonControlInitFlags
        ICC_LISTVIEW_CLASSES = &H1
        ICC_TREEVIEW_CLASSES = &H2
        ICC_BAR_CLASSES = &H4
        ICC_TAB_CLASSES = &H8
        ICC_UPDOWN_CLASS = &H10
        ICC_PROGRESS_CLASS = &H20
        ICC_HOTKEY_CLASS = &H40
        ICC_ANIMATE_CLASS = &H80
        ICC_WIN95_CLASSES = &HFF
        ICC_DATE_CLASSES = &H100
        ICC_USEREX_CLASSES = &H200
        ICC_COOL_CLASSES = &H400
        ICC_INTERNET_CLASSES = &H800
        ICC_PAGESCROLLER_CLASS = &H1000
        ICC_NATIVEFNTCTL_CLASS = &H2000
    End Enum
#End Region

#Region "Common Controls Styles"
    Public Enum CommonControlStyles
        CCS_TOP = &H1
        CCS_NOMOVEY = &H2
        CCS_BOTTOM = &H3
        CCS_NORESIZE = &H4
        CCS_NOPARENTALIGN = &H8
        CCS_ADJUSTABLE = &H20
        CCS_NODIVIDER = &H40
        CCS_VERT = &H80
        CCS_LEFT = (CCS_VERT Or CCS_TOP)
        CCS_RIGHT = (CCS_VERT Or CCS_BOTTOM)
        CCS_NOMOVEX = (CCS_VERT Or CCS_NOMOVEY)
    End Enum
#End Region

#Region "ToolBar Styles"
    Public Enum ToolBarStyles
        TBSTYLE_BUTTON = &H0
        TBSTYLE_SEP = &H1
        TBSTYLE_CHECK = &H2
        TBSTYLE_GROUP = &H4
        TBSTYLE_CHECKGROUP = (TBSTYLE_GROUP Or TBSTYLE_CHECK)
        TBSTYLE_DROPDOWN = &H8
        TBSTYLE_AUTOSIZE = &H10
        TBSTYLE_NOPREFIX = &H20
        TBSTYLE_TOOLTIPS = &H100
        TBSTYLE_WRAPABLE = &H200
        TBSTYLE_ALTDRAG = &H400
        TBSTYLE_FLAT = &H800
        TBSTYLE_LIST = &H1000
        TBSTYLE_CUSTOMERASE = &H2000
        TBSTYLE_REGISTERDROP = &H4000
        TBSTYLE_TRANSPARENT = &H8000
        TBSTYLE_EX_DRAWDDARROWS = &H1
    End Enum
#End Region

#Region "ToolBar Ex Styles"
    Public Enum ToolBarExStyles
        TBSTYLE_EX_DRAWDDARROWS = &H1
        TBSTYLE_EX_HIDECLIPPEDBUTTONS = &H10
        TBSTYLE_EX_DOUBLEBUFFER = &H80
    End Enum
#End Region

#Region "ToolBar Messages"
    Public Enum ToolBarMessages
        WM_USER = &H400
        TB_ENABLEBUTTON = (WM_USER + 1)
        TB_CHECKBUTTON = (WM_USER + 2)
        TB_PRESSBUTTON = (WM_USER + 3)
        TB_HIDEBUTTON = (WM_USER + 4)
        TB_INDETERMINATE = (WM_USER + 5)
        TB_MARKBUTTON = (WM_USER + 6)
        TB_ISBUTTONENABLED = (WM_USER + 9)
        TB_ISBUTTONCHECKED = (WM_USER + 10)
        TB_ISBUTTONPRESSED = (WM_USER + 11)
        TB_ISBUTTONHIDDEN = (WM_USER + 12)
        TB_ISBUTTONINDETERMINATE = (WM_USER + 13)
        TB_ISBUTTONHIGHLIGHTED = (WM_USER + 14)
        TB_SETSTATE = (WM_USER + 17)
        TB_GETSTATE = (WM_USER + 18)
        TB_ADDBITMAP = (WM_USER + 19)
        TB_ADDBUTTONSA = (WM_USER + 20)
        TB_INSERTBUTTONA = (WM_USER + 21)
        TB_ADDBUTTONS = (WM_USER + 20)
        TB_INSERTBUTTON = (WM_USER + 21)
        TB_DELETEBUTTON = (WM_USER + 22)
        TB_GETBUTTON = (WM_USER + 23)
        TB_BUTTONCOUNT = (WM_USER + 24)
        TB_COMMANDTOINDEX = (WM_USER + 25)
        TB_SAVERESTOREA = (WM_USER + 26)
        TB_CUSTOMIZE = (WM_USER + 27)
        TB_ADDSTRINGA = (WM_USER + 28)
        TB_GETITEMRECT = (WM_USER + 29)
        TB_BUTTONSTRUCTSIZE = (WM_USER + 30)
        TB_SETBUTTONSIZE = (WM_USER + 31)
        TB_SETBITMAPSIZE = (WM_USER + 32)
        TB_AUTOSIZE = (WM_USER + 33)
        TB_GETTOOLTIPS = (WM_USER + 35)
        TB_SETTOOLTIPS = (WM_USER + 36)
        TB_SETPARENT = (WM_USER + 37)
        TB_SETROWS = (WM_USER + 39)
        TB_GETROWS = (WM_USER + 40)
        TB_GETBITMAPFLAGS = (WM_USER + 41)
        TB_SETCMDID = (WM_USER + 42)
        TB_CHANGEBITMAP = (WM_USER + 43)
        TB_GETBITMAP = (WM_USER + 44)
        TB_GETBUTTONTEXTA = (WM_USER + 45)
        TB_GETBUTTONTEXTW = (WM_USER + 75)
        TB_REPLACEBITMAP = (WM_USER + 46)
        TB_SETINDENT = (WM_USER + 47)
        TB_SETIMAGELIST = (WM_USER + 48)
        TB_GETIMAGELIST = (WM_USER + 49)
        TB_LOADIMAGES = (WM_USER + 50)
        TB_GETRECT = (WM_USER + 51)
        TB_SETHOTIMAGELIST = (WM_USER + 52)
        TB_GETHOTIMAGELIST = (WM_USER + 53)
        TB_SETDISABLEDIMAGELIST = (WM_USER + 54)
        TB_GETDISABLEDIMAGELIST = (WM_USER + 55)
        TB_SETSTYLE = (WM_USER + 56)
        TB_GETSTYLE = (WM_USER + 57)
        TB_GETBUTTONSIZE = (WM_USER + 58)
        TB_SETBUTTONWIDTH = (WM_USER + 59)
        TB_SETMAXTEXTROWS = (WM_USER + 60)
        TB_GETTEXTROWS = (WM_USER + 61)
        TB_GETOBJECT = (WM_USER + 62)
        TB_GETBUTTONINFOW = (WM_USER + 63)
        TB_SETBUTTONINFOW = (WM_USER + 64)
        TB_GETBUTTONINFOA = (WM_USER + 65)
        TB_SETBUTTONINFOA = (WM_USER + 66)
        TB_INSERTBUTTONW = (WM_USER + 67)
        TB_ADDBUTTONSW = (WM_USER + 68)
        TB_HITTEST = (WM_USER + 69)
        TB_SETDRAWTEXTFLAGS = (WM_USER + 70)
        TB_GETHOTITEM = (WM_USER + 71)
        TB_SETHOTITEM = (WM_USER + 72)
        TB_SETANCHORHIGHLIGHT = (WM_USER + 73)
        TB_GETANCHORHIGHLIGHT = (WM_USER + 74)
        TB_SAVERESTOREW = (WM_USER + 76)
        TB_ADDSTRINGW = (WM_USER + 77)
        TB_MAPACCELERATORA = (WM_USER + 78)
        TB_GETINSERTMARK = (WM_USER + 79)
        TB_SETINSERTMARK = (WM_USER + 80)
        TB_INSERTMARKHITTEST = (WM_USER + 81)
        TB_MOVEBUTTON = (WM_USER + 82)
        TB_GETMAXSIZE = (WM_USER + 83)
        TB_SETEXTENDEDSTYLE = (WM_USER + 84)
        TB_GETEXTENDEDSTYLE = (WM_USER + 85)
        TB_GETPADDING = (WM_USER + 86)
        TB_SETPADDING = (WM_USER + 87)
        TB_SETINSERTMARKCOLOR = (WM_USER + 88)
        TB_GETINSERTMARKCOLOR = (WM_USER + 89)
    End Enum
#End Region

#Region "ToolBar Notifications"
    Public Enum ToolBarNotifications
        TTN_NEEDTEXTA = ((0 - 520) - 0)
        TTN_NEEDTEXTW = ((0 - 520) - 10)
        TBN_QUERYINSERT = ((0 - 700) - 6)
        TBN_DROPDOWN = ((0 - 700) - 10)
        TBN_HOTITEMCHANGE = ((0 - 700) - 13)
    End Enum
#End Region

#Region "Reflected Messages"
    Public Enum ReflectedMessages
        OCM__BASE = (MsgEnum.WM_USER + &H1C00)
        OCM_COMMAND = (OCM__BASE + MsgEnum.WM_COMMAND)
        OCM_CTLCOLORBTN = (OCM__BASE + MsgEnum.WM_CTLCOLORBTN)
        OCM_CTLCOLOREDIT = (OCM__BASE + MsgEnum.WM_CTLCOLOREDIT)
        OCM_CTLCOLORDLG = (OCM__BASE + MsgEnum.WM_CTLCOLORDLG)
        OCM_CTLCOLORLISTBOX = (OCM__BASE + MsgEnum.WM_CTLCOLORLISTBOX)
        OCM_CTLCOLORMSGBOX = (OCM__BASE + MsgEnum.WM_CTLCOLORMSGBOX)
        OCM_CTLCOLORSCROLLBAR = (OCM__BASE + MsgEnum.WM_CTLCOLORSCROLLBAR)
        OCM_CTLCOLORSTATIC = (OCM__BASE + MsgEnum.WM_CTLCOLORSTATIC)
        OCM_CTLCOLOR = (OCM__BASE + MsgEnum.WM_CTLCOLOR)
        OCM_DRAWITEM = (OCM__BASE + MsgEnum.WM_DRAWITEM)
        OCM_MEASUREITEM = (OCM__BASE + MsgEnum.WM_MEASUREITEM)
        OCM_DELETEITEM = (OCM__BASE + MsgEnum.WM_DELETEITEM)
        OCM_VKEYTOITEM = (OCM__BASE + MsgEnum.WM_VKEYTOITEM)
        OCM_CHARTOITEM = (OCM__BASE + MsgEnum.WM_CHARTOITEM)
        OCM_COMPAREITEM = (OCM__BASE + MsgEnum.WM_COMPAREITEM)
        OCM_HSCROLL = (OCM__BASE + MsgEnum.WM_HSCROLL)
        OCM_VSCROLL = (OCM__BASE + MsgEnum.WM_VSCROLL)
        OCM_PARENTNOTIFY = (OCM__BASE + MsgEnum.WM_PARENTNOTIFY)
        OCM_NOTIFY = (OCM__BASE + MsgEnum.WM_NOTIFY)
    End Enum
#End Region

#Region "Notification Messages"
    Public Enum NotificationMessages
        NM_FIRST = (0 - 0)
        NM_CUSTOMDRAW = (NM_FIRST - 12)
        NM_NCHITTEST = (NM_FIRST - 14)
    End Enum
#End Region

#Region "ToolTip Flags"
    Public Enum ToolTipFlags
        TTF_IDISHWND = &H1
        TTF_CENTERTIP = &H2
        TTF_RTLREADING = &H4
        TTF_SUBCLASS = &H10
        TTF_TRACK = &H20
        TTF_ABSOLUTE = &H80
        TTF_TRANSPARENT = &H100
        TTF_DI_SETITEM = &H8000
    End Enum

    Public Enum ToolTipsDelays
        TTDT_AUTOMATIC = 0
        TTDT_RESHOW = 1
        TTDT_AUTOPOP = 2
        TTDT_INITIAL = 3
    End Enum

    Public Enum ToolTipStyles
        TTS_ALWAYSTIP = &H1
        TTS_NOPREFIX = &H2
        TTS_NOANIMATE = &H10
        TTS_NOFADE = &H20
        TTS_BALLOON = &H40
    End Enum

    Public Enum ToolTipMsg
        TTM_ACTIVATE = (MsgEnum.WM_USER + 1)
        TTM_SETDELAYTIME = (MsgEnum.WM_USER + 3)
        TTM_ADDTOOLA = (MsgEnum.WM_USER + 4)
        TTM_ADDTOOLW = (MsgEnum.WM_USER + 50)
        TTM_DELTOOLA = (MsgEnum.WM_USER + 5)
        TTM_DELTOOLW = (MsgEnum.WM_USER + 51)
        TTM_NEWTOOLRECTA = (MsgEnum.WM_USER + 6)
        TTM_NEWTOOLRECTW = (MsgEnum.WM_USER + 52)
        TTM_RELAYEVENT = (MsgEnum.WM_USER + 7)
        TTM_GETTOOLINFOA = (MsgEnum.WM_USER + 8)
        TTM_GETTOOLINFOW = (MsgEnum.WM_USER + 53)
        TTM_SETTOOLINFOA = (MsgEnum.WM_USER + 9)
        TTM_SETTOOLINFOW = (MsgEnum.WM_USER + 54)
        TTM_HITTESTA = (MsgEnum.WM_USER + 10)
        TTM_HITTESTW = (MsgEnum.WM_USER + 55)
        TTM_GETTEXTA = (MsgEnum.WM_USER + 11)
        TTM_GETTEXTW = (MsgEnum.WM_USER + 56)
        TTM_UPDATETIPTEXTA = (MsgEnum.WM_USER + 12)
        TTM_UPDATETIPTEXTW = (MsgEnum.WM_USER + 57)
        TTM_GETTOOLCOUNT = (MsgEnum.WM_USER + 13)
        TTM_ENUMTOOLSA = (MsgEnum.WM_USER + 14)
        TTM_ENUMTOOLSW = (MsgEnum.WM_USER + 58)
        TTM_GETCURRENTTOOLA = (MsgEnum.WM_USER + 15)
        TTM_GETCURRENTTOOLW = (MsgEnum.WM_USER + 59)
        TTM_WINDOWFROMPOINT = (MsgEnum.WM_USER + 16)
        TTM_TRACKACTIVATE = (MsgEnum.WM_USER + 17)
        TTM_TRACKPOSITION = (MsgEnum.WM_USER + 18)
        TTM_SETTIPBKCOLOR = (MsgEnum.WM_USER + 19)
        TTM_SETTIPTEXTCOLOR = (MsgEnum.WM_USER + 20)
        TTM_GETDELAYTIME = (MsgEnum.WM_USER + 21)
        TTM_GETTIPBKCOLOR = (MsgEnum.WM_USER + 22)
        TTM_GETTIPTEXTCOLOR = (MsgEnum.WM_USER + 23)
        TTM_SETMAXTIPWIDTH = (MsgEnum.WM_USER + 24)
        TTM_GETMAXTIPWIDTH = (MsgEnum.WM_USER + 25)
        TTM_SETMARGIN = (MsgEnum.WM_USER + 26)
        TTM_GETMARGIN = (MsgEnum.WM_USER + 27)
        TTM_POP = (MsgEnum.WM_USER + 28)
        TTM_UPDATE = (MsgEnum.WM_USER + 29)
        TTM_GETBUBBLESIZE = (MsgEnum.WM_USER + 30)
        TTM_ADJUSTRECT = (MsgEnum.WM_USER + 31)
        TTM_SETTITLEA = (MsgEnum.WM_USER + 32)
        TTM_SETTITLEW = (MsgEnum.WM_USER + 33)
    End Enum

    Public Enum ToolTipNotifyMsg As Integer
        TTN_FIRST = (0 - 520)
        TTN_GETDISPINFOA = (TTN_FIRST - 0)
        TTN_GETDISPINFOW = (TTN_FIRST - 10)
        TTN_SHOW = (TTN_FIRST - 1)
        TTN_POP = (TTN_FIRST - 2)
    End Enum
#End Region

#Region "Custom Draw Return Flags"
    <Flags()> _
    Public Enum CustomDrawReturnFlags
        CDRF_DODEFAULT = &H0
        CDRF_NEWFONT = &H2
        CDRF_SKIPDEFAULT = &H4
        CDRF_NOTIFYPOSTPAINT = &H10
        CDRF_NOTIFYITEMDRAW = &H20
        CDRF_NOTIFYSUBITEMDRAW = &H20
        CDRF_NOTIFYPOSTERASE = &H40
    End Enum
#End Region

#Region "Custom Draw Item State Flags"
    Public Enum CustomDrawItemStateFlags
        CDIS_SELECTED = &H1
        CDIS_GRAYED = &H2
        CDIS_DISABLED = &H4
        CDIS_CHECKED = &H8
        CDIS_FOCUS = &H10
        CDIS_DEFAULT = &H20
        CDIS_HOT = &H40
        CDIS_MARKED = &H80
        CDIS_INDETERMINATE = &H100
    End Enum
#End Region

#Region "Custom Draw Draw State Flags"
    Public Enum CustomDrawDrawStateFlags
        CDDS_PREPAINT = &H1
        CDDS_POSTPAINT = &H2
        CDDS_PREERASE = &H3
        CDDS_POSTERASE = &H4
        CDDS_ITEM = &H10000
        CDDS_ITEMPREPAINT = (CDDS_ITEM Or CDDS_PREPAINT)
        CDDS_ITEMPOSTPAINT = (CDDS_ITEM Or CDDS_POSTPAINT)
        CDDS_ITEMPREERASE = (CDDS_ITEM Or CDDS_PREERASE)
        CDDS_ITEMPOSTERASE = (CDDS_ITEM Or CDDS_POSTERASE)
        CDDS_SUBITEM = &H20000
    End Enum
#End Region

#Region "Toolbar button info flags"
    Public Enum ToolBarButtonInfoFlags
        TBIF_IMAGE = &H1
        TBIF_TEXT = &H2
        TBIF_STATE = &H4
        TBIF_STYLE = &H8
        TBIF_LPARAM = &H10
        TBIF_COMMAND = &H20
        TBIF_SIZE = &H40
        I_IMAGECALLBACK = -1
        I_IMAGENONE = -2
    End Enum
#End Region

#Region "Toolbar button styles"
    Public Enum ToolBarButtonStyles
        TBSTYLE_BUTTON = &H0
        TBSTYLE_SEP = &H1
        TBSTYLE_CHECK = &H2
        TBSTYLE_GROUP = &H4
        TBSTYLE_CHECKGROUP = (TBSTYLE_GROUP Or TBSTYLE_CHECK)
        TBSTYLE_DROPDOWN = &H8
        TBSTYLE_AUTOSIZE = &H10
        TBSTYLE_NOPREFIX = &H20
        TBSTYLE_TOOLTIPS = &H100
        TBSTYLE_WRAPABLE = &H200
        TBSTYLE_ALTDRAG = &H400
        TBSTYLE_FLAT = &H800
        TBSTYLE_LIST = &H1000
        TBSTYLE_CUSTOMERASE = &H2000
        TBSTYLE_REGISTERDROP = &H4000
        TBSTYLE_TRANSPARENT = &H8000
        TBSTYLE_EX_DRAWDDARROWS = &H1
    End Enum
#End Region

#Region "Toolbar button state"
    Public Enum ToolBarButtonStates
        TBSTATE_CHECKED = &H1
        TBSTATE_PRESSED = &H2
        TBSTATE_ENABLED = &H4
        TBSTATE_HIDDEN = &H8
        TBSTATE_INDETERMINATE = &H10
        TBSTATE_WRAP = &H20
        TBSTATE_ELLIPSES = &H40
        TBSTATE_MARKED = &H80
    End Enum
#End Region

#Region "Windows Hook Codes"
    Public Enum WindowsHookCodes
        WH_MSGFILTER = (-1)
        WH_JOURNALRECORD = 0
        WH_JOURNALPLAYBACK = 1
        WH_KEYBOARD = 2
        WH_GETMESSAGE = 3
        WH_CALLWNDPROC = 4
        WH_CBT = 5
        WH_SYSMSGFILTER = 6
        WH_MOUSE = 7
        WH_HARDWARE = 8
        WH_DEBUG = 9
        WH_SHELL = 10
        WH_FOREGROUNDIDLE = 11
        WH_CALLWNDPROCRET = 12
        WH_KEYBOARD_LL = 13
        WH_MOUSE_LL = 14
    End Enum

#End Region

#Region "Mouse Hook Filters"
    Public Enum MouseHookFilters
        MSGF_DIALOGBOX = 0
        MSGF_MESSAGEBOX = 1
        MSGF_MENU = 2
        MSGF_SCROLLBAR = 5
        MSGF_NEXTWINDOW = 6
    End Enum

#End Region

#Region "Draw Text format flags"
    Public Enum DrawTextFormatFlags
        DT_TOP = &H0
        DT_LEFT = &H0
        DT_CENTER = &H1
        DT_RIGHT = &H2
        DT_VCENTER = &H4
        DT_BOTTOM = &H8
        DT_WORDBREAK = &H10
        DT_SINGLELINE = &H20
        DT_EXPANDTABS = &H40
        DT_TABSTOP = &H80
        DT_NOCLIP = &H100
        DT_EXTERNALLEADING = &H200
        DT_CALCRECT = &H400
        DT_NOPREFIX = &H800
        DT_INTERNAL = &H1000
        DT_EDITCONTROL = &H2000
        DT_PATH_ELLIPSIS = &H4000
        DT_END_ELLIPSIS = &H8000
        DT_MODIFYSTRING = &H10000
        DT_RTLREADING = &H20000
        DT_WORD_ELLIPSIS = &H40000
    End Enum

#End Region

#Region "Rebar Styles"
    Public Enum RebarStyles
        RBS_TOOLTIPS = &H100
        RBS_VARHEIGHT = &H200
        RBS_BANDBORDERS = &H400
        RBS_FIXEDORDER = &H800
        RBS_REGISTERDROP = &H1000
        RBS_AUTOSIZE = &H2000
        RBS_VERTICALGRIPPER = &H4000
        RBS_DBLCLKTOGGLE = &H8000

    End Enum
#End Region

#Region "Rebar Notifications"
    Public Enum RebarNotifications
        RBN_FIRST = (0 - 831)
        RBN_HEIGHTCHANGE = (RBN_FIRST - 0)
        RBN_GETOBJECT = (RBN_FIRST - 1)
        RBN_LAYOUTCHANGED = (RBN_FIRST - 2)
        RBN_AUTOSIZE = (RBN_FIRST - 3)
        RBN_BEGINDRAG = (RBN_FIRST - 4)
        RBN_ENDDRAG = (RBN_FIRST - 5)
        RBN_DELETINGBAND = (RBN_FIRST - 6)
        RBN_DELETEDBAND = (RBN_FIRST - 7)
        RBN_CHILDSIZE = (RBN_FIRST - 8)
        RBN_CHEVRONPUSHED = (RBN_FIRST - 10)
    End Enum
#End Region

#Region "Rebar Messages"
    Public Enum RebarMessages
        CCM_FIRST = &H2000
        WM_USER = &H400
        RB_INSERTBANDA = (WM_USER + 1)
        RB_DELETEBAND = (WM_USER + 2)
        RB_GETBARINFO = (WM_USER + 3)
        RB_SETBARINFO = (WM_USER + 4)
        RB_GETBANDINFO = (WM_USER + 5)
        RB_SETBANDINFOA = (WM_USER + 6)
        RB_SETPARENT = (WM_USER + 7)
        RB_HITTEST = (WM_USER + 8)
        RB_GETRECT = (WM_USER + 9)
        RB_INSERTBANDW = (WM_USER + 10)
        RB_SETBANDINFOW = (WM_USER + 11)
        RB_GETBANDCOUNT = (WM_USER + 12)
        RB_GETROWCOUNT = (WM_USER + 13)
        RB_GETROWHEIGHT = (WM_USER + 14)
        RB_IDTOINDEX = (WM_USER + 16)
        RB_GETTOOLTIPS = (WM_USER + 17)
        RB_SETTOOLTIPS = (WM_USER + 18)
        RB_SETBKCOLOR = (WM_USER + 19)
        RB_GETBKCOLOR = (WM_USER + 20)
        RB_SETTEXTCOLOR = (WM_USER + 21)
        RB_GETTEXTCOLOR = (WM_USER + 22)
        RB_SIZETORECT = (WM_USER + 23)
        RB_SETCOLORSCHEME = (CCM_FIRST + 2)
        RB_GETCOLORSCHEME = (CCM_FIRST + 3)
        RB_BEGINDRAG = (WM_USER + 24)
        RB_ENDDRAG = (WM_USER + 25)
        RB_DRAGMOVE = (WM_USER + 26)
        RB_GETBARHEIGHT = (WM_USER + 27)
        RB_GETBANDINFOW = (WM_USER + 28)
        RB_GETBANDINFOA = (WM_USER + 29)
        RB_MINIMIZEBAND = (WM_USER + 30)
        RB_MAXIMIZEBAND = (WM_USER + 31)
        RB_GETDROPTARGET = (CCM_FIRST + 4)
        RB_GETBANDBORDERS = (WM_USER + 34)
        RB_SHOWBAND = (WM_USER + 35)
        RB_SETPALETTE = (WM_USER + 37)
        RB_GETPALETTE = (WM_USER + 38)
        RB_MOVEBAND = (WM_USER + 39)
        RB_SETUNICODEFORMAT = (CCM_FIRST + 5)
        RB_GETUNICODEFORMAT = (CCM_FIRST + 6)
    End Enum
#End Region

#Region "Rebar Info Mask"
    Public Enum RebarInfoMask
        RBBIM_STYLE = &H1
        RBBIM_COLORS = &H2
        RBBIM_TEXT = &H4
        RBBIM_IMAGE = &H8
        RBBIM_CHILD = &H10
        RBBIM_CHILDSIZE = &H20
        RBBIM_SIZE = &H40
        RBBIM_BACKGROUND = &H80
        RBBIM_ID = &H100
        RBBIM_IDEALSIZE = &H200
        RBBIM_LPARAM = &H400
        BBIM_HEADERSIZE = &H800
    End Enum
#End Region

#Region "Rebar Styles"
    Public Enum RebarStylesEx
        RBBS_BREAK = &H1
        RBBS_CHILDEDGE = &H4
        RBBS_FIXEDBMP = &H20
        RBBS_GRIPPERALWAYS = &H80
        RBBS_USECHEVRON = &H200
    End Enum
#End Region

#Region "Object types"
    Public Enum ObjectTypes
        OBJ_PEN = 1
        OBJ_BRUSH = 2
        OBJ_DC = 3
        OBJ_METADC = 4
        OBJ_PAL = 5
        OBJ_FONT = 6
        OBJ_BITMAP = 7
        OBJ_REGION = 8
        OBJ_METAFILE = 9
        OBJ_MEMDC = 10
        OBJ_EXTPEN = 11
        OBJ_ENHMETADC = 12
        OBJ_ENHMETAFILE = 13
    End Enum
#End Region

#Region "WM_MENUCHAR return values"
    Public Enum MenuCharReturnValues
        MNC_IGNORE = 0
        MNC_CLOSE = 1
        MNC_EXECUTE = 2
        MNC_SELECT = 3
    End Enum
#End Region

#Region "Background Mode"
    Public Enum BackgroundMode
        TRANSPARENT = 1
        OPAQUE = 2
    End Enum
#End Region

#Region "ListView Messages"
    Public Enum ListViewMessages
        LVM_FIRST = &H1000
        LVM_GETSUBITEMRECT = (LVM_FIRST + 56)
        LVM_GETITEMSTATE = (LVM_FIRST + 44)
        LVM_GETITEMTEXTW = (LVM_FIRST + 115)
        LVM_GETITEMRECT = (LVM_FIRST + 14)
    End Enum
#End Region

#Region "TreeView Notifications"
    Public Enum TreeViewNotification
        TVN_DeleteItem = -458
        TVN_SelectionChanging = -450
        TVN_SelectionChanged = -451
    End Enum

#End Region

#Region "Header Control Messages"
    Public Enum HeaderControlMessages As Integer
        HDM_FIRST = &H1200
        HDM_GETITEMRECT = (HDM_FIRST + 7)
        HDM_HITTEST = (HDM_FIRST + 6)
        HDM_SETIMAGELIST = (HDM_FIRST + 8)
        HDM_GETITEMW = (HDM_FIRST + 11)
        HDM_ORDERTOINDEX = (HDM_FIRST + 15)
    End Enum
#End Region

#Region "Header Control Notifications"
    Public Enum HeaderControlNotifications
        HDN_FIRST = (0 - 300)
        HDN_BEGINTRACKW = (HDN_FIRST - 26)
        HDN_ENDTRACKW = (HDN_FIRST - 27)
        HDN_ITEMCLICKW = (HDN_FIRST - 22)

    End Enum
#End Region

#Region "Header Control HitTest Flags"
    Public Enum HeaderControlHitTestFlags As Integer
        HHT_NOWHERE = &H1
        HHT_ONHEADER = &H2
        HHT_ONDIVIDER = &H4
        HHT_ONDIVOPEN = &H8
        HHT_ABOVE = &H100
        HHT_BELOW = &H200
        HHT_TORIGHT = &H400
        HHT_TOLEFT = &H800
    End Enum
#End Region

#Region "List View sub item portion"
    Public Enum SubItemPortion
        LVIR_BOUNDS = 0
        LVIR_ICON = 1
        LVIR_LABEL = 2
    End Enum
#End Region

#Region "Cursor Type"
    Public Enum CursorType As Integer
        IDC_ARROW = 32512
        IDC_IBEAM = 32513
        IDC_WAIT = 32514
        IDC_CROSS = 32515
        IDC_UPARROW = 32516
        IDC_SIZE = 32640
        IDC_ICON = 32641
        IDC_SIZENWSE = 32642
        IDC_SIZENESW = 32643
        IDC_SIZEWE = 32644
        IDC_SIZENS = 32645
        IDC_SIZEALL = 32646
        IDC_NO = 32648
        IDC_HAND = 32649
        IDC_APPSTARTING = 32650
        IDC_HELP = 32651
    End Enum
#End Region

#Region "Tracker Event Flags"
    Public Enum TrackerEventFlags As Integer
        TME_HOVER = &H1
        TME_LEAVE = &H2
        TME_QUERY = &H40000000
        TME_CANCEL = &H80000000
    End Enum
#End Region

#Region "Mouse Activate Flags"
    Public Enum MouseActivateFlags
        MA_ACTIVATE = 1
        MA_ACTIVATEANDEAT = 2
        MA_NOACTIVATE = 3
        MA_NOACTIVATEANDEAT = 4
    End Enum
#End Region

#Region "Dialog Codes"
    Public Enum DialogCodes
        DLGC_WANTARROWS = &H1
        DLGC_WANTTAB = &H2
        DLGC_WANTALLKEYS = &H4
        DLGC_WANTMESSAGE = &H4
        DLGC_HASSETSEL = &H8
        DLGC_DEFPUSHBUTTON = &H10
        DLGC_UNDEFPUSHBUTTON = &H20
        DLGC_RADIOBUTTON = &H40
        DLGC_WANTCHARS = &H80
        DLGC_STATIC = &H100
        DLGC_BUTTON = &H2000
    End Enum
#End Region

#Region "Update Layered Windows Flags"
    Public Enum UpdateLayeredWindowsFlags
        ULW_COLORKEY = &H1
        ULW_ALPHA = &H2
        ULW_OPAQUE = &H4
    End Enum
#End Region

#Region "Alpha Flags"
    Public Enum AlphaFlags As Byte
        AC_SRC_OVER = &H0
        AC_SRC_ALPHA = &H1
    End Enum
#End Region

#Region "ComboBox messages"
    Public Enum ComboBoxMessages
        CB_GETDROPPEDSTATE = &H157
    End Enum
#End Region

#Region "SetWindowLong indexes"
    Public Enum SetWindowLongOffsets
        GWL_WNDPROC = (-4)
        GWL_HINSTANCE = (-6)
        GWL_HWNDPARENT = (-8)
        GWL_STYLE = (-16)
        GWL_EXSTYLE = (-20)
        GWL_USERDATA = (-21)
        GWL_ID = (-12)
    End Enum
#End Region

#Region "TreeView Messages"
    Public Enum TreeViewMessages
        TV_FIRST = &H1100
        TVM_GETITEMRECT = (TV_FIRST + 4)
        TVM_GETITEMW = (TV_FIRST + 62)
        TVM_HITTEST = (TV_FIRST + 17)
        TVM_INSERTITEMA = (TV_FIRST + 0)
        TVM_INSERTITEMW = (TV_FIRST + 50)

    End Enum
#End Region

#Region "TreeViewItem Flags"
    Public Enum TreeViewItemFlags
        TVIF_TEXT = &H1
        TVIF_IMAGE = &H2
        TVIF_PARAM = &H4
        TVIF_STATE = &H8
        TVIF_HANDLE = &H10
        TVIF_SELECTEDIMAGE = &H20
        TVIF_CHILDREN = &H40
        TVIF_INTEGRAL = &H80
    End Enum
#Region "TreeView HitTest"

    <Flags()> _
    Public Enum TVHitTestFlags
        TVHT_NOWHERE = &H1
        TVHT_ONITEMICON = &H2
        TVHT_ONITEMLABEL = &H4
        TVHT_ONITEMINDENT = &H8
        TVHT_ONITEMBUTTON = &H10
        TVHT_ONITEMRIGHT = &H20
        TVHT_ONITEMSTATEICON = &H40
        TVHT_ABOVE = &H100
        TVHT_BELOW = &H200
        TVHT_TORIGHT = &H400
        TVHT_TOLEFT = &H800
    End Enum

#End Region

#Region "ListViewItem flags"
    Public Enum ListViewItemFlags
        LVIF_TEXT = &H1
        LVIF_IMAGE = &H2
        LVIF_PARAM = &H4
        LVIF_STATE = &H8
        LVIF_INDENT = &H10
        LVIF_NORECOMPUTE = &H800
    End Enum
#End Region

#Region "HeaderItem flags"
    Public Enum HeaderItemFlags
        HDI_WIDTH = &H1
        HDI_HEIGHT = HDI_WIDTH
        HDI_TEXT = &H2
        HDI_FORMAT = &H4
        HDI_LPARAM = &H8
        HDI_BITMAP = &H10
        HDI_IMAGE = &H20
        HDI_DI_SETITEM = &H40
        HDI_ORDER = &H80
    End Enum
#End Region

#Region "GetDCExFlags"
    Public Enum GetDCExFlags
        DCX_WINDOW = &H1
        DCX_CACHE = &H2
        DCX_NORESETATTRS = &H4
        DCX_CLIPCHILDREN = &H8
        DCX_CLIPSIBLINGS = &H10
        DCX_PARENTCLIP = &H20
        DCX_EXCLUDERGN = &H40
        DCX_INTERSECTRGN = &H80
        DCX_EXCLUDEUPDATE = &H100
        DCX_INTERSECTUPDATE = &H200
        DCX_LOCKWINDOWUPDATE = &H400
        DCX_VALIDATE = &H200000
    End Enum
#End Region

#Region "HitTest "
    Public Enum HitTest
        HTERROR = (-2)
        HTTRANSPARENT = (-1)
        HTNOWHERE = 0
        HTCLIENT = 1
        HTCAPTION = 2
        HTSYSMENU = 3
        HTGROWBOX = 4
        HTSIZE = HTGROWBOX
        HTMENU = 5
        HTHSCROLL = 6
        HTVSCROLL = 7
        HTMINBUTTON = 8
        HTMAXBUTTON = 9
        HTLEFT = 10
        HTRIGHT = 11
        HTTOP = 12
        HTTOPLEFT = 13
        HTTOPRIGHT = 14
        HTBOTTOM = 15
        HTBOTTOMLEFT = 16
        HTBOTTOMRIGHT = 17
        HTBORDER = 18
        HTREDUCE = HTMINBUTTON
        HTZOOM = HTMAXBUTTON
        HTSIZEFIRST = HTLEFT
        HTSIZELAST = HTBOTTOMRIGHT
        HTOBJECT = 19
        HTCLOSE = 20
        HTHELP = 21
    End Enum
#End Region

#Region "ActivateFlags"
    Public Enum ActivateState
        WA_INACTIVE = 0
        WA_ACTIVE = 1
        WA_CLICKACTIVE = 2
    End Enum
#End Region

#Region "StrechModeFlags"
    Public Enum StrechModeFlags
        BLACKONWHITE = 1
        WHITEONBLACK = 2
        COLORONCOLOR = 3
        HALFTONE = 4
        MAXSTRETCHBLTMODE = 4
    End Enum
#End Region

#Region "ScrollBarFlags"
    Public Enum ScrollBarFlags
        SBS_HORZ = &H0
        SBS_VERT = &H1
        SBS_TOPALIGN = &H2
        SBS_LEFTALIGN = &H2
        SBS_BOTTOMALIGN = &H4
        SBS_RIGHTALIGN = &H4
        SBS_SIZEBOXTOPLEFTALIGN = &H2
        SBS_SIZEBOXBOTTOMRIGHTALIGN = &H4
        SBS_SIZEBOX = &H8
        SBS_SIZEGRIP = &H10
    End Enum
#End Region

#Region "System Metrics Codes"
    Public Enum SystemMetricsCodes
        SM_CXSCREEN = 0
        SM_CYSCREEN = 1
        SM_CXVSCROLL = 2
        SM_CYHSCROLL = 3
        SM_CYCAPTION = 4
        SM_CXBORDER = 5
        SM_CYBORDER = 6
        SM_CXDLGFRAME = 7
        SM_CYDLGFRAME = 8
        SM_CYVTHUMB = 9
        SM_CXHTHUMB = 10
        SM_CXICON = 11
        SM_CYICON = 12
        SM_CXCURSOR = 13
        SM_CYCURSOR = 14
        SM_CYMENU = 15
        SM_CXFULLSCREEN = 16
        SM_CYFULLSCREEN = 17
        SM_CYKANJIWINDOW = 18
        SM_MOUSEPRESENT = 19
        SM_CYVSCROLL = 20
        SM_CXHSCROLL = 21
        SM_DEBUG = 22
        SM_SWAPBUTTON = 23
        SM_RESERVED1 = 24
        SM_RESERVED2 = 25
        SM_RESERVED3 = 26
        SM_RESERVED4 = 27
        SM_CXMIN = 28
        SM_CYMIN = 29
        SM_CXSIZE = 30
        SM_CYSIZE = 31
        SM_CXFRAME = 32
        SM_CYFRAME = 33
        SM_CXMINTRACK = 34
        SM_CYMINTRACK = 35
        SM_CXDOUBLECLK = 36
        SM_CYDOUBLECLK = 37
        SM_CXICONSPACING = 38
        SM_CYICONSPACING = 39
        SM_MENUDROPALIGNMENT = 40
        SM_PENWINDOWS = 41
        SM_DBCSENABLED = 42
        SM_CMOUSEBUTTONS = 43
        SM_CXFIXEDFRAME = SM_CXDLGFRAME
        SM_CYFIXEDFRAME = SM_CYDLGFRAME
        SM_CXSIZEFRAME = SM_CXFRAME
        SM_CYSIZEFRAME = SM_CYFRAME
        SM_SECURE = 44
        SM_CXEDGE = 45
        SM_CYEDGE = 46
        SM_CXMINSPACING = 47
        SM_CYMINSPACING = 48
        SM_CXSMICON = 49
        SM_CYSMICON = 50
        SM_CYSMCAPTION = 51
        SM_CXSMSIZE = 52
        SM_CYSMSIZE = 53
        SM_CXMENUSIZE = 54
        SM_CYMENUSIZE = 55
        SM_ARRANGE = 56
        SM_CXMINIMIZED = 57
        SM_CYMINIMIZED = 58
        SM_CXMAXTRACK = 59
        SM_CYMAXTRACK = 60
        SM_CXMAXIMIZED = 61
        SM_CYMAXIMIZED = 62
        SM_NETWORK = 63
        SM_CLEANBOOT = 67
        SM_CXDRAG = 68
        SM_CYDRAG = 69
        SM_SHOWSOUNDS = 70
        SM_CXMENUCHECK = 71
        SM_CYMENUCHECK = 72
        SM_SLOWMACHINE = 73
        SM_MIDEASTENABLED = 74
        SM_MOUSEWHEELPRESENT = 75
        SM_XVIRTUALSCREEN = 76
        SM_YVIRTUALSCREEN = 77
        SM_CXVIRTUALSCREEN = 78
        SM_CYVIRTUALSCREEN = 79
        SM_CMONITORS = 80
        SM_SAMEDISPLAYFORMAT = 81
        SM_CMETRICS = 83
    End Enum
#End Region

#Region "ScrollBarTypes"
    Public Enum ScrollBarTypes
        SB_HORZ = 0
        SB_VERT = 1
        SB_CTL = 2
        SB_BOTH = 3
    End Enum
#End Region

#Region "SrollBarInfoFlags"
    Public Enum ScrollBarInfoFlags
        SIF_RANGE = &H1
        SIF_PAGE = &H2
        SIF_POS = &H4
        SIF_DISABLENOSCROLL = &H8
        SIF_TRACKPOS = &H10
        SIF_ALL = (SIF_RANGE Or SIF_PAGE Or SIF_POS Or SIF_TRACKPOS)
    End Enum
#End Region

#Region "Enable ScrollBar flags"
    Public Enum EnableScrollBarFlags
        ESB_ENABLE_BOTH = &H0
        ESB_DISABLE_BOTH = &H3
        ESB_DISABLE_LEFT = &H1
        ESB_DISABLE_RIGHT = &H2
        ESB_DISABLE_UP = &H1
        ESB_DISABLE_DOWN = &H2
        ESB_DISABLE_LTUP = ESB_DISABLE_LEFT
        ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT
    End Enum
#End Region

#Region "Scroll Requests"
    Public Enum ScrollBarRequests
        SB_LINEUP = 0
        SB_LINELEFT = 0
        SB_LINEDOWN = 1
        SB_LINERIGHT = 1
        SB_PAGEUP = 2
        SB_PAGELEFT = 2
        SB_PAGEDOWN = 3
        SB_PAGERIGHT = 3
        SB_THUMBPOSITION = 4
        SB_THUMBTRACK = 5
        SB_TOP = 6
        SB_LEFT = 6
        SB_BOTTOM = 7
        SB_RIGHT = 7
        SB_ENDSCROLL = 8
    End Enum
#End Region

#Region "SrollWindowEx flags"
    Public Enum ScrollWindowExFlags
        SW_SCROLLCHILDREN = &H1
        SW_INVALIDATE = &H2
        SW_ERASE = &H4
        SW_SMOOTHSCROLL = &H10
    End Enum
#End Region

#Region "ImageListFlags"
    Public Enum ImageListFlags
        ILC_MASK = &H1
        ILC_COLOR = &H0
        ILC_COLORDDB = &HFE
        ILC_COLOR4 = &H4
        ILC_COLOR8 = &H8
        ILC_COLOR16 = &H10
        ILC_COLOR24 = &H18
        ILC_COLOR32 = &H20
        ILC_PALETTE = &H800
    End Enum
#End Region

#Region "List View Notifications"
    Public Enum ListViewNotifications
        LVN_FIRST = (0 - 100)
        LVN_GETDISPINFOW = (LVN_FIRST - 77)
        LVN_SETDISPINFOA = (LVN_FIRST - 51)
    End Enum
#End Region

#Region "Richedit Control Messages"
    Public Enum RichEditMessages
        EM_CANPASTE = MsgEnum.WM_USER + 50
        EM_DISPLAYBAND = MsgEnum.WM_USER + 51
        EM_EXGETSEL = MsgEnum.WM_USER + 52
        EM_EXLIMITTEXT = MsgEnum.WM_USER + 53
        EM_EXLINEFROMCHAR = MsgEnum.WM_USER + 54
        EM_EXSETSEL = MsgEnum.WM_USER + 55
        EM_FINDTEXT = MsgEnum.WM_USER + 56
        EM_FORMATRANGE = MsgEnum.WM_USER + 57
        EM_GETCHARFORMAT = MsgEnum.WM_USER + 58
        EM_GETEVENTMASK = MsgEnum.WM_USER + 59
        EM_GETOLEINTERFACE = MsgEnum.WM_USER + 60
        EM_GETPARAFORMAT = MsgEnum.WM_USER + 61
        EM_GETSELTEXT = MsgEnum.WM_USER + 62
        EM_HIDESELECTION = MsgEnum.WM_USER + 63
        EM_PASTESPECIAL = MsgEnum.WM_USER + 64
        EM_REQUESTRESIZE = MsgEnum.WM_USER + 65
        EM_SELECTIONTYPE = MsgEnum.WM_USER + 66
        EM_SETBKGNDCOLOR = MsgEnum.WM_USER + 67
        EM_SETCHARFORMAT = MsgEnum.WM_USER + 68
        EM_SETEVENTMASK = MsgEnum.WM_USER + 69
        EM_SETOLECALLBACK = MsgEnum.WM_USER + 70
        EM_SETPARAFORMAT = MsgEnum.WM_USER + 71
        EM_SETTARGETDEVICE = MsgEnum.WM_USER + 72
        EM_STREAMIN = MsgEnum.WM_USER + 73
        EM_STREAMOUT = MsgEnum.WM_USER + 74
        EM_GETTEXTRANGE = MsgEnum.WM_USER + 75
        EM_FINDWORDBREAK = MsgEnum.WM_USER + 76
        EM_SETOPTIONS = MsgEnum.WM_USER + 77
        EM_GETOPTIONS = MsgEnum.WM_USER + 78
        EM_FINDTEXTEX = MsgEnum.WM_USER + 79
        EM_SETTYPOGRAPHYOPTIONS = MsgEnum.WM_USER + 202
        EM_GETTYPOGRAPHYOPTIONS = MsgEnum.WM_USER + 203
    End Enum

    <Flags()> _
    Public Enum RichEditMask
        PFM_ALIGNMENT = &H8
        PFM_BORDER = &H800
        PFM_LINESPACING = &H100
        PFM_NUMBERING = &H20
        PFM_NUMBERINGSTART = &H8000
        PFM_NUMBERINGSTYLE = &H2000
        PFM_NUMBERINGTAB = &H4000
        PFM_OFFSET = &H4
        PFM_OFFSETINDENT = &H80000000
        PFM_RIGHTINDENT = &H2
        PFM_SHADING = &H1000
        PFM_SPACEAFTER = &H80
        PFM_SPACEBEFORE = &H40
        PFM_STARTINDENT = &H1
        PFM_STYLE = &H400
        PFM_TABSTOPS = &H10
    End Enum

    Public Enum RichEditNumbering
        PFN_NONE = 0
        PFN_BULLET = 1
        PFN_ARABIC = 2
        PFN_LCLETTER = 3
        PFN_UCLETTER = 4
        PFN_LCROMAN = 5
        PFN_UCROMAN = 6
    End Enum

    Public Enum RichEditAlignment
        PFA_LEFT = &H1
        PFA_RIGHT = &H2
        PFA_CENTER = &H3
        PFA_JUSTIFY = &H4
        PFA_FULL_INTERWORD = &H4
    End Enum

    ' Options for EM_SETTYPOGRAPHYOPTIONS 
    Public Enum RichEditTypography
        TO_ADVANCEDTYPOGRAPHY = 1
        TO_SIMPLELINEBREAK = 2
    End Enum

    Public Enum RichEditNumberingStyle
        None = 0
        Enclose = &H100
        Folllows = &H200
        Number = &H300
        [Continue] = &H400
        UseStart = &H8000
    End Enum
#End Region

#Region "Notify Icon"
    <Flags()> _
    Public Enum NotifyInfoFlags
        NIIF_NONE = &H0
        NIIF_INFO = &H1
        NIIF_WARNING = &H2
        NIIF_ERROR = &H3
    End Enum

    <Flags()> _
    Public Enum NotifyFlags
        NIF_MESSAGE = &H1
        NIF_ICON = &H2
        NIF_TIP = &H4
        NIF_STATE = &H8
        NIF_INFO = &H10
    End Enum

    Public Enum NotifyState
        NIS_HIDDEN = &H1
        NIS_SHAREDICON = &H2
    End Enum

    Public Enum NotifyCommand
        NIM_ADD = &H0
        NIM_MODIFY = &H1
        NIM_DELETE = &H2
        NIM_SETFOCUS = &H3
        NIM_SETVERSION = &H4
    End Enum
#End Region

#Region "AnimateWindow"
    Public Enum AnimateWindowFlags
        AW_HOR_POSITIVE = &H1
        AW_HOR_NEGATIVE = &H2
        AW_VER_POSITIVE = &H4
        AW_VER_NEGATIVE = &H8
        AW_CENTER = &H10
        AW_HIDE = &H10000
        AW_ACTIVATE = &H20000
        AW_SLIDE = &H40000
        AW_BLEND = &H80000
    End Enum
#End Region
#End Region
End Namespace
